-----------------------------------------------------------------------
-- File:        Zone.ads
-- Description: Provides zoneacquiring and release functionality
--
-- Requires:    Io_Ports,Unsigned_Types,Raildefs,Dio192defs, Dda06defs,
--              Int32defs,Topolog2,Dio192_Blocks
--				
-- Author:     Ha Le
-----------------------------------------------------------------------
with Io_Ports;
with Unsigned_Types;
use Unsigned_Types;  -- 1.8
with Raildefs,
   Dio192defs, Dda06defs, Int32defs,Halls2;
use Raildefs;
with Topolog2;

package Zone is --PROTECTED

   -- Acquare a zone
   --It returns Success=true if the train has acquired the crossing
   --It returns Success=false if another train owns the crossing
   procedure Acquire_Zone (
         Success :    out Boolean;
         Train   : in     Raildefs. Train_Id;
         B       : in     Topolog2. Zone_Id);
   --Release a zone
    --It returns Success=true if the train has releaed the crossing
   procedure Release_Zone (
         Train : in     Raildefs. Train_Id;
         B     : in     Topolog2. Zone_Id);

end Zone;